package com.service;

import com.config.RibbitMQConfig;
import org.springframework.amqp.rabbit.annotation.RabbitHandler;
import org.springframework.amqp.rabbit.annotation.RabbitListener;
import org.springframework.stereotype.Component;

@Component
public class MQlistener {

    @RabbitListener(queues = RibbitMQConfig.MIAOSHA_QUEUE)
    @RabbitHandler
    public void shouXiaoxi(String msg)
    {
        System.out.println("收到了消息:"+msg);
    }
}
